package com.niit.session23.bank1;

public class WindowsThread extends Thread{
	private Bank bank;
	private String name;

	public WindowsThread(Bank bank, String name) {
		super();
		this.bank = bank;
		this.name = name;
	}
	@Override
	public void run() {
		bank.getMoney(name);
	}
	
	
	
	public static void main(String[] args) {
		Bank bank2 = new Bank();
		WindowsThread w1 = new WindowsThread(bank2, "窗口1");
		WindowsThread w2 = new WindowsThread(bank2, "窗口2");
		WindowsThread w3 = new WindowsThread(bank2, "窗口3");
		WindowsThread w4 = new WindowsThread(bank2, "窗口4");
		w1.start();
		w2.start();
		w3.start();
		w4.start();
	}

}
